const express = require('express')
const router = express.Router()
const Jwt = require('../utils/jwt')
const jwt = new Jwt()

const api = require('../module/api')
const user = require('../module/user')

// 查询卡密
router.get('/checkCard', api.checkCard)
// 兑换
router.post('/exchangeGoods', api.exchangeGoods)
// 登录
router.post('/login', user.login)
// 获取菜单
router.get('/menu', jwt.jwtCheck, user.menu)
// 查询卡密数量
router.get('/getCardNum', api.getCardNum)
// 获取卡密 getCardList
router.get('/getCardList', api.getCardList)
// 删除卡密
router.post('/delCard', api.delCard)
// 批量删除卡密
router.post('/delCardList', api.delCardList)
// 批量添加卡密
router.post('/addCardList', api.addCardList)
module.exports = router